#![allow(unused_imports)]

// use std::sync::Arc ;
// use http::Uri ;
// use aws_sdk_s3::{config::Builder, Client, Endpoint, Region, RetryConfig};
// use datafusion_objectstore_s3::object_store::s3::S3FileSystem;
// use aws_types::credentials::SharedCredentialsProvider;
// use aws_types::credentials::Credentials;
// 
// use datafusion::prelude::ExecutionContext;
// use datafusion::prelude::AvroReadOptions ;
// use datafusion::datasource::listing::{ListingTableConfig, ListingTable};

#[tokio::main]
async fn main() -> anyhow::Result<()> {
//     const MINIO_ACCESS_KEY_ID: &str = "chinapex";
//     const MINIO_SECRET_ACCESS_KEY: &str = "chinapex";
//     const PROVIDER_NAME: &str = "Static";
//     const MINIO_ENDPOINT: &str = "http://10.25.21.106:2002";
// 
//     let s3_file_system = Arc::new(S3FileSystem::new(
//         Some(SharedCredentialsProvider::new(Credentials::new(
//             MINIO_ACCESS_KEY_ID,
//             MINIO_SECRET_ACCESS_KEY,
//             None,
//             None,
//             PROVIDER_NAME,
//         ))), // Credentials provider
//         None, // Region
//         Some(Endpoint::immutable(Uri::from_static(MINIO_ENDPOINT))), // Endpoint
//         None, // RetryConfig
//         None, // AsyncSleep
//         None, // TimeoutConfig
//     ).await);
// 
//     let mut ctx = ExecutionContext::new();
// 
//     let file_path = "user/hive/warehouse/data_pipeline_nexus_test.db/dc_event/event=click/event=click/platform=wechat/dt=20220505";
// 
// 
//     let df = ctx.sql("SELECT * FROM tbl").await?;
//     df.show().await? ;
// 
//     println!("Hello, world!");
    Ok(())
}
